package com.caesar.exer2;

import java.util.Scanner;

/**
 * @author caesar
 * @date 2025/7/21
 * @Description:
 * @apiNote
 */
public class ChatThread extends Thread {
    @Override
    public void run() {
        Scanner input = new Scanner(System.in);

        while(true){
            System.out.print("是否结束（Y、N）：");
            String answer = input.nextLine();
            if("y".equalsIgnoreCase(answer)){
                break;
            }
        }

        input.close();
    }
}
